package pemks.util;/**
 * @description:  
 * @author kl
 * @date 2025/4/5 下午6:09
 * @version 1.0
 */
import org.mindrot.jbcrypt.BCrypt;

public class PasswordUtil {
    public static String encode(String rawPassword) {
        return BCrypt.hashpw(rawPassword, BCrypt.gensalt());
    }

    public static boolean matches(String rawPassword, String encodedPassword) {
        return BCrypt.checkpw(rawPassword, encodedPassword);
    }
}
